<script setup lang="ts">
function clickMinHandler() {
    window?.ipcRenderer?.send('minimize');
}

function clickCloseHandler() {
    window?.ipcRenderer?.send('close-client');
}

defineOptions({
    name: 'ApplicationButtonGroup'
});
</script>

<template>
    <NSpace>
        <!-- 最小化 -->
        <NButton quaternary :bordered="false" @click="clickMinHandler">
            <NIcon>
                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                    <path
                        fill="none"
                        stroke="currentColor"
                        stroke-linecap="round"
                        stroke-linejoin="round"
                        stroke-width="2.5"
                        d="M6 12h12"
                    />
                </svg>
            </NIcon>
        </NButton>
        <!-- 关闭 -->
        <NButton quaternary :bordered="false" @click="clickCloseHandler">
            <NIcon>
                <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
                    <path
                        fill="currentColor"
                        fill-rule="evenodd"
                        d="M4.28 3.22a.75.75 0 0 0-1.06 1.06L4.94 6L3.22 7.72a.75.75 0 0 0 1.06 1.06L6 7.06l1.72 1.72a.75.75 0 0 0 1.06-1.06L7.06 6l1.72-1.72a.75.75 0 0 0-1.06-1.06L6 4.94z"
                        clip-rule="evenodd"
                    />
                </svg>
            </NIcon>
        </NButton>
    </NSpace>
</template>

<style scoped></style>
